package com.test03_类与对象;

/**
 * 简单Java类
 */
public class YootkDemo_06 {

    public static void main(String[] args) {
        Dept dept = new Dept(10, "沐言优拓技术研发部", "北京");
        System.out.println(dept.getInfo());
    }
}

/**
 * 部门类
 */
class Dept {
    private long deptno;    // 描述部门编号
    private String dname;   // 部门名称
    private String loc;     // 部门位置

    public Dept() {
    }

    public Dept(long deptno, String dname, String loc) {
        this.deptno = deptno;
        this.dname = dname;
        this.loc = loc;
    }

    public void setDeptno(long deptno) {
        this.deptno = deptno;
    }

    public void setDname(String dname) {
        this.dname = dname;
    }

    public void setLoc(String loc) {
        this.loc = loc;
    }

    public long getDeptno() {
        return this.deptno;
    }

    public String getDname() {
        return this.dname;
    }

    public String getLoc() {
        return this.loc;
    }

    public String getInfo() {
        return "【部门】部门编号：" + this.deptno + "、部门名称：" + this.dname + "、部门位置：" + this.loc;
    }
}
